Utilisation of : na_seadec() function
= Removes the seasonal component from the time series, performs
imputation on the deseasonalized series and afterwards adds the seasonal
component again.
By autocorrelation + decompose function or Mann-Kendall : not possible because of gaps
–> Filling gaps.
##
## Call:
## lm(formula = y ~ x, data = reg_val_ts_temp_som_less_season)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.2143 -1.3761 -0.0379 1.2627 7.3816
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 18.17497 0.16215 112.086 < 2e-16 ***
## x 0.06879 0.01629 4.224 2.67e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.137 on 832 degrees of freedom
## Multiple R-squared: 0.02099, Adjusted R-squared: 0.01981
## F-statistic: 17.84 on 1 and 832 DF, p-value: 2.671e-05
Slope is 0.069.
##
## Call:
## lm(formula = y ~ x, data = reg_val_ts_sal_som_less_season)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.27358 -0.08520 0.05114 0.17007 0.43699
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 37.9500975 0.0211116 1797.592 <2e-16 ***
## x -0.0001388 0.0020841 -0.067 0.947
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2787 on 832 degrees of freedom
## Multiple R-squared: 5.329e-06, Adjusted R-squared: -0.001197
## F-statistic: 0.004434 on 1 and 832 DF, p-value: 0.9469
Slope is 0.
##
## Call:
## lm(formula = y ~ x, data = reg_val_ts_oxy_som_less_season)
##
## Residuals:
## Min 1Q Median 3Q Max
## -52.554 -13.868 0.713 14.278 58.247
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 231.1150 1.3735 168.273 < 2e-16 ***
## x 0.4599 0.1520 3.025 0.00256 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 17.92 on 832 degrees of freedom
## Multiple R-squared: 0.01088, Adjusted R-squared: 0.009691
## F-statistic: 9.152 on 1 and 832 DF, p-value: 0.002561
Slope is 0.46.
##
## Call:
## lm(formula = y ~ x, data = reg_val_ts_aou_som_less_season)
##
## Residuals:
## Min 1Q Median 3Q Max
## -49.333 -8.959 -1.327 7.272 63.330
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.528809 0.972700 -1.572 0.116
## x -0.044808 0.006033 -7.427 2.75e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.98 on 832 degrees of freedom
## Multiple R-squared: 0.06218, Adjusted R-squared: 0.06105
## F-statistic: 55.16 on 1 and 832 DF, p-value: 2.753e-13
Slope is -0.045.
## [1] 52
##
## Call:
## lm(formula = y ~ x, data = reg_val_ts_ph_som_less_season)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.091919 -0.008087 0.000901 0.008464 0.053927
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 8.0871235 0.0017723 4562.94 <2e-16 ***
## x -0.0037125 0.0003217 -11.54 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.01521 on 415 degrees of freedom
## Multiple R-squared: 0.243, Adjusted R-squared: 0.2412
## F-statistic: 133.2 on 1 and 415 DF, p-value: < 2.2e-16
Slope is -0.0037.
##
## Call:
## lm(formula = y ~ x, data = reg_val_ts_ph25_som_less_season)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.065216 -0.006559 0.000560 0.007624 0.030494
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.9754409 0.0016366 4873.054 <2e-16 ***
## x -0.0008251 0.0003530 -2.338 0.02 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.01218 on 336 degrees of freedom
## Multiple R-squared: 0.016, Adjusted R-squared: 0.01307
## F-statistic: 5.464 on 1 and 336 DF, p-value: 0.01999
Slope is -8^{-4}.
##
## Call:
## lm(formula = y ~ x, data = reg_val_ts_ta_som_less_season)
##
## Residuals:
## Min 1Q Median 3Q Max
## -55.012 -7.174 0.744 7.972 34.467
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.550e+03 9.480e-01 2690.196 < 2e-16 ***
## x 5.397e-01 9.505e-02 5.678 1.89e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 12.39 on 818 degrees of freedom
## Multiple R-squared: 0.03792, Adjusted R-squared: 0.03675
## F-statistic: 32.24 on 1 and 818 DF, p-value: 1.89e-08
##
## Call:
## lm(formula = y ~ x, data = reg_val_ts_dic_som_less_season)
##
## Residuals:
## Min 1Q Median 3Q Max
## -56.041 -7.370 -0.436 6.962 49.663
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2227.8511 1.0381 2146.09 <2e-16 ***
## x 2.3996 0.1059 22.66 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 13.54 on 818 degrees of freedom
## Multiple R-squared: 0.3856, Adjusted R-squared: 0.3849
## F-statistic: 513.5 on 1 and 818 DF, p-value: < 2.2e-16
Slope is 2.3996.
##
## Call:
## lm(formula = y ~ x, data = reg_val_ts_npco2_som_less_season)
##
## Residuals:
## Min 1Q Median 3Q Max
## -63.639 -10.793 -0.726 9.541 73.760
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 380.6386 1.4597 260.77 <2e-16 ***
## x 3.8944 0.1738 22.41 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 17.03 on 676 degrees of freedom
## Multiple R-squared: 0.4263, Adjusted R-squared: 0.4254
## F-statistic: 502.3 on 1 and 676 DF, p-value: < 2.2e-16
Slope is 3.8944.
##
## Call:
## lm(formula = y ~ x, data = reg_val_ts_tpco2_som_less_season)
##
## Residuals:
## Min 1Q Median 3Q Max
## -102.260 -10.129 -0.884 11.125 90.660
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 408.6197 1.7157 238.170 < 2e-16 ***
## x 1.3717 0.1911 7.177 1.76e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 20.93 on 728 degrees of freedom
## Multiple R-squared: 0.06608, Adjusted R-squared: 0.0648
## F-statistic: 51.51 on 1 and 728 DF, p-value: 1.759e-12
Slope is 1.3717.
The function kendall.SeasonalTrendTest returns estimated values of Kendall’s τ, the slope, and the intercept for each season, as well as a single estimate for each of these three quantities combined over all seasons. The overall estimate of τ is the weighted average of the p seasonal τ’s
The overall estimate of slope is the median of all two-point slopes computed within each season.
The overall estimate of intercept is the median of the p seasonal estimates of intercept.
The Kendall Tau, or Kendall rank correlation coefficient, measures the monotony of the slope. Kendall’s Tau varies between -1 and 1; it is positive when the trend increases and negative when the trend decreases.
The Sen slope, which estimates the overall slope of the time series. This slope corresponds to the median of all the slopes calculated between each pair of points in the series.
The significance, which represents the threshold for which the hypothesis that there is no trend is accepted. The trend is statistically significant when the p-value is less than 0.05.
Results:
## tau slope intercept
## 0.1706592 0.0588000 -95.1549068
## tau slope intercept
## 0.120366159 0.008733333 17.433617625
## tau slope intercept
## 0.06463341 0.19334433 -103.85815454
## tau slope intercept
## -0.1435331 -0.3892117 681.3424309
## tau slope intercept
## -0.315104877 -0.003043814 13.820156485
## tau slope intercept
## -0.108828665 -0.001062714 9.451001988
## tau slope intercept
## 0.1537045 0.7121110 1068.9098590
## tau slope intercept
## 0.4768069 2.5655170 -3083.4315360
## tau slope intercept
## 0.4888721 3.7316570 -6721.4398537
## tau slope intercept
## 0.1706592 0.9313975 -1209.3123620